<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>企业活动 - 可漾官网</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="keywords" content="可漾  可漾官网   可漾红豆薏米水  可漾五红汤  可漾红豆水  可漾绿豆水  可漾牛蒡茶  可漾产品  山东可漾饮料有限公司" />
    <meta http-equiv="description"
      content="山东可漾饮料有限公司在以红豆薏米水为代表的谷物饮品方面已经形成了完善的研发、生产和销售体系，并申请了红豆水萃取提纯技术专利，产品一经上市便热销全网。其中抖音、淘宝平台销售额在同类产品中遥遥领先。" />
    <meta name="keywords" content="可漾  可漾官网   可漾红豆薏米水  可漾五红汤  可漾红豆水  可漾绿豆水  可漾牛蒡茶  可漾产品  山东可漾饮料有限公司" />
    <meta name="description"
      content="山东可漾饮料有限公司在以红豆薏米水为代表的谷物饮品方面已经形成了完善的研发、生产和销售体系，并申请了红豆水萃取提纯技术专利，产品一经上市便热销全网。其中抖音、淘宝平台销售额在同类产品中遥遥领先。" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
    <link rel="bookmark" href="../favicon.ico" />
    <meta name="viewport" content="user-scalable=yes, width=device-width, initial-scale=0.5">
    <link rel="stylesheet" href="../static/css/main.css">
    <link rel="stylesheet" href="../static/css/header.css">
    <link rel="stylesheet" href="../static/css/enterpriseactivity.min.css">
    <link rel="stylesheet" href="../static/css/footer.min.css">
    <link rel="stylesheet" href="../static/libs/swiper-bundle.min.css">
    <style>
    .img-list:first-child{
    	width:70%;
    }
    .img-list{
    	overflow: hidden;
    }
      .swiper-slide{
        overflow: hidden;
      }
      .scale{
        transition: transform 0.2s ease-in-out;
      }
      .scale:hover{
        transform: scale(1.1);
      }
    </style>
  </head>
  <header>
    <div class="nav-box">
      <div id="logo" class="fl">
        <a href="../index.html"><img src="../static/images/Logo.png" alt="可漾"></a>
      </div>
      <ul class="nav fl clear">
        <a href="../index.html" class="nav-item nav-item1">首页</a>
        <a href="./about.html" class="nav-item">关于我们</a>  
        <span class="nav-item-wrap">
          <a href="./product.html" class="nav-item">
            <span class="nav-span">可漾产品</span>
          </a>
          <ul class="nav-list nav-list-prod">
            <!-- <li class="nav-li">红豆薏米水</li>
            <li class="nav-li">绿豆水</li>
            <li class="nav-li">五红汤</li>
            <li class="nav-li">红豆水</li>
            <li class="nav-li">红豆牛蒡茶</li> -->
          </ul>
        </span>  
        <span class="nav-item-wrap nav-item-wrap2">
          <a href="./brandnew.html" class="nav-item active">
            <span class="nav-span">企业动态</span>
          </a>
          <ul class="nav-list nav-list2 nav-list-dynamic">
            <li class="nav-li">
              <a href="./brandnew.html">品牌新闻</a>
            </li>
            <li class="nav-li">
              <a href="./enterpriseactivity.html">企业活动</a>
            </li>
            <li class="nav-li">
              <a href="./wonderfulmoment.html">精彩瞬间</a>
            </li>
          </ul>
        </span>
        <a href="./join.html" class="nav-item">加入我们</a>  
      </ul>
    </div>
  </header>
  <main>
    <h1 class="main-title">企业活动</h1>
    <p class="main-desc"></p>
    <ul class="img-list flex">
    </ul>
    <ul class="more-img-list">
      <div class="swiper activitySwiper">
        <div class="swiper-wrapper activity-swiper-wrapper">
        </div>
      </div>
      <div class="swiper-button-next"></div>
      <div class="swiper-button-prev"></div>
    </ul>
  </main>
  <!-- 底部区域 -->
  <footer>
    <div class="footer flex">
      <ul class="link-box flex">
      <li>
        <h3>关于我们</h3>
        <p><a href="./about.html#about-box">企业介绍</a></p>
        <p><a href="./about.html#mission-box">企业使命</a></p>
        <p><a href="./about.html#roadmap">企业发展</a></p>
      </li>
      <li class="footer-prod-list">
      </li>
      <li>
        <h3>企业动态</h3>
        <p><a href="./brandnew.html">品牌新闻</a></p>
        <p><a href="./enterpriseactivity.html">企业活动</a></p>
        <p><a href="./wonderfulmoment.html">精彩瞬间</a></p>
      </li>
      <li>
        <h3>加入我们</h3>
        <p><a href="./join.html">未来展望</a></p>
        <p><a href="./join.html">招商加盟</a></p>
      </li>
    </ul>
    <ul class="addr-box">
      <h2>怕湿气，喝可漾</h2>
      <p>山东可漾饮料有限公司</p>
      <p>售后服务热线：4006279199</p>
      <p>地址：山东省潍坊市坊子区黄旗堡街办一马路</p>
      <ul class="feedback flex-start">
        <li class="qr">
          <img src="../static/images/qrcode.png" alt="">
          <span>关注微信公众号</span>
          <img class="qrcode-scan" src="../static/images/qrcode-scan.png" alt="">
        </li>
      </ul>
    </ul>
    </div>
    <div class="right"><a href="https://beian.miit.gov.cn/#/Integrated/index">鲁ICP备19040840号-1</a></div>
  </footer>
  <script src="../static/js/master.js"></script>
  <script src="../static/libs/jquery-1.10.1.min.js"></script>
  <script src="../static/libs/swiper-bundle.min.js"></script>
  <script>
    $(function() {
      var baseUrl = 'http://guanwang.keyangyinliao.com/api';
    // 商品列表
      var prodListData = [];
      getProdList();
      function getProdList() {
        $.ajax({
          url: baseUrl + '/ad',
          type: 'get',
          dataType: 'json',
          success: function (res) {
            if (res.code !== 200) return;
            prodListData = res.data;
            initNavProds()
          }
        })
      }

      function initNavProds() {
        var prodListHeadSubHtml = '',
        footerProdListHtml = '<h3>可漾产品</h3>';

        $.each(prodListData, function(i) {
          prodListHeadSubHtml += '<li class="nav-li" data-id=' + prodListData[i].id + '>' + prodListData[i].title + '</li>'
        
          footerProdListHtml += '<p><a href="./product.html?id=' + prodListData[i].id + '">' + prodListData[i].title + '</a></p>';
        })


        // 头部导航[产品]下的【子产品】导航
        $('.nav-list-prod').append(prodListHeadSubHtml);
        $('.nav-list-prod .nav-li').each(function(i) {
          $(this).click(function() {
            window.location.href = './product.html?id=' + $(this).attr('data-id');
          })
        })

        // footer里的产品信息
        $('.footer-prod-list').append(footerProdListHtml);
      }

      // 企业活动列表
      var activityListData = [],
      activityListCount = 0,
      activityHtml = '',
      activityDesc = '';

      getActivityList();
      function getActivityList() {
        $.ajax({
          url: baseUrl + '/article/listByCategoryName',
          type: 'get',
          dataType: 'json',
          data: {
            category_name: '企业活动',
            limit: 8,
            offset: 0
          },
          success: function (res) {
            if (res.code !== 200) return;
            activityListCount = res.data.count;
            activityListData = res.data.list;
            activityDesc = res.data.category_desc;
            // 设置企业活动下面的描述
            $('.main-desc').text(activityDesc);

            initActivityDom();
            initMoreActivityDom();
            $('.activity-li').click(function() {
              window.location.href = './detail.html?id=' + $(this).attr('data-id') + '&category=' + $(this).attr('data-category');
            })
          }
        })
      }

      function initActivityDom() {
        activityHtml = ''
        var specialArticle = '';
        var topTwoCardData = activityListData.slice(0,2)
        $.each(topTwoCardData, function(i) {
          if (i == 0) {
            specialArticle = 'first';
          } else if (i == 1) {
            specialArticle = 'second';
          } else {
            specialArticle = '';
          }
          activityHtml += '<li style="height:2.6rem;background:url('+ activityListData[i].banner_img +') no-repeat;background-size:cover" class="activity-li fl scale '  + specialArticle + '" data-id="' + activityListData[i].id + 
          '"  title="' + activityListData[i].title + '" data-category="' + activityListData[i].article_categorie.name + '">' +
            '<p class="title-bg word-hidden"><span class="title">' + activityListData[i].title + '</span></p>' +
            // '<img class="scale-img animate-transition" src="' + activityListData[i].banner_img + '" alt="">' +
          '</li>'
        })
        $('.img-list').append(activityHtml)
      }
      // 更多轮博的
      function initMoreActivityDom() {
        var moreActivityData = activityListData.slice(2);
        $('.activity-swiper-wrapper').empty();
        $.each(moreActivityData, function(i) {
          activitySwiper.appendSlide('<li style="width:3.7rem;height:2.6rem;background:url('+ activityListData[i].banner_img +') no-repeat;background-size:cover" class="swiper-slide activity-li scale" data-id="' + moreActivityData[i].id + 
          '"  title="' + moreActivityData[i].title + '" data-category="' + moreActivityData[i].article_categorie.name + '">' +
            '<p class="title-bg word-hidden"><span class="title">' + moreActivityData[i].title + '</span></p>' +
            // '<img class="scale-img animate-transition" src="' + moreActivityData[i].banner_img + '" alt="">' +
          '</li>');
        })
      }

      var activitySwiper = new Swiper(".activitySwiper", {
        slidesPerView: 3,
        spaceBetween: 30,
        navigation: {
          nextEl: ".swiper-button-next",
          prevEl: ".swiper-button-prev",
        },
      });
    })
  </script>
</html>